package day04;

import java.util.Arrays;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/18
 */
public class Test03 {
    public static void main(String[] args) {
        //int[] arr = {5,11,15,24,36,47,59,66};
        int[] arr=new int[]{5,11,15,24,36,47,59,66};
        System.out.println("原数组："+Arrays.toString(arr));
        //不能遍历整个数组不然等于没转
        for(int i=0;i<arr.length/2;i++){
            int temp=arr[i];
            arr[i]=arr[arr.length-i-1];
            arr[arr.length-i-1]=temp;
        }
        System.out.println("逆转后的数组："+Arrays.toString(arr));

    }
}
